package httpserver

import (
	"github.com/gin-gonic/gin"
	"io"
)

var (
	Server *server
)

func init() {
	Server = &server{}
	gin.SetMode(gin.DebugMode)
	gin.DefaultWriter = io.MultiWriter()
	Server.engine = gin.Default()
	Server.router = make(map[string]interface{})
}

func StartServer() {
	go Server.startServer()
}

func GetRouter() map[string]interface{} {
	return Server.router
}
